{extend name="base" /}
{block name="header"}
<style>
    .swiper-container{
        width: 43.75rem;
        height: 18.125rem;
        margin:0 auto;
    }
</style>
{/block}
{block name="header_top"}
<div class="header-top shadow-sm">
    <div class="d-flex width-out py-4 justify-content-between align-items-center">
        <a class="d-block mr-5 logo" href="/" style="width: 250px" ><img src="__IMAGES__/logo.png" width="250px" style="width: 250px"></a>
        <div class="input-group mr-4">
            <input type="text" class="form-control" placeholder="9年高考 | 高考资料 | 开学第一课 | 开学资料" aria-label="Recipient's username" aria-describedby="buttonSearch" id="searchInput">
            <div class="input-group-append">
                <button class="btn btn-primary px-4 searchBtn" type="button" id="buttonSearch" data-btn="search" data-target="searchInput"><i class="iconfont">&#xe672;</i></button>
            </div>
        </div>
        <!--        <a class="d-block mr-4 text-nowrap">-->
        <!--            <h5 class="text-nowrap mb-0 text-warning d-inline-block font-weight-bold">我要投稿</h5>-->
        <!--            <div class="badge badge-drop-danger"><span>现金奖励</span></div>-->
        <!--        </a>-->
        <div class="text-nowrap d-flex align-items-center">
            {eq name="$user_info" value=""}
            <a class="avatar d-block login-modal" data-target="#loginModal" data-toggle="modal" target="_blank"><img class="user-avatar" src="__IMAGES__/head_portrait.png"></a>
            <a class="text-nowrap text-primary login-hide {eq name="$site_info['weixin_login']" value='off'}reg-modal{else}login-modal{/eq}" data-target="#loginModal" data-toggle="modal">登录</a>
            <span class="mx-2 text-black-50 login-hide">/</span>
            <a class="text-nowrap text-secondary login-hide reg-modal" data-target="#loginModal" data-toggle="modal">注册</a>
            {/eq}
        </div>
    </div>
    <div class="width-out d-flex align-items-center">
        <div class="nav-sidebar-tab">
            <ul class="nav nav-pills" id="pills-tab" role="tablist">
                <li class="nav-item"><a class="nav-link">&nbsp;&nbsp;&nbsp;</a></li>
                <li class="nav-item"><a class="nav-link">全部分类</a></li>
                <li class="nav-item"><a class="nav-link">&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
            </ul>

        </div>
        <ul class="nav nav-fill flex-grow-1 main-nav">
            {nav_list limit="6"}
            <li class="nav-item">
                <a class="nav-link" href="{$link}" target="{$target}">{$name}</a>
            </li>
            {/nav_list}
            <li class="nav-item ml-4 navAd">
                <a class="nav-link nav-img subsitute-bg float-right" href="{:url('/vip')}"><img src="__IMAGES__/new-tip.jpg"></a>
            </li>

        </ul>
    </div>
</div>
{/block}
{block name="body"}
<div class="gg-area width-out mt-3 row">
    <div class="col mr-3 nav-sidebar index-nav-sidebar">
        <div class="tab-content" id="navSidebarTabContent">
            <div class="tab-pane fade show active" id="NS0" role="tabpanel" aria-labelledby="NS0-tab">
                <ul>
                    {category_list pid="-1"}
                    <li>
                        <a class="text-dark d-flex justify-content-between align-items-center text-decoration-none" href="#" target="_blank"><span>{$name}</span><i class="iconfont">&#xe7c3;</i></a>
                        <div class="nav-popover">
                            <ul class="font-14">
                                <li class="d-flex">
                                    <!--  <p class="text-nowrap flex-shrink-0">{$name}</p>-->
                                    <dl class="d-flex flex-wrap">
                                        {foreach $category.children as $item}
                                        <dd><a class="btn btn-light-primary" href="{:url(sprintf("/c-%s-%s",$category['id'],$item['id']))}" target="_blank">{$item.name}</a></dd>
                                        {/foreach}
                                    </dl>
                                </li>
                            </ul>
                        </div>
                    </li>
                    {/category_list}
                </ul>
            </div>
        </div>

    </div>
    <div class="col-10">
        <div class="row">
            <!--幻灯片开始-->
            <div class="swiper-container carousel slide col-6">
                <div class="swiper-wrapper">
                    {slide limit="1"}
                    <div class="swiper-slide "><img src="/{$image}" alt="{$name}" /></div>
                    {/slide}
                </div>
                <div class="swiper-button-prev"></div>
                <div class="swiper-button-next"></div>
                <div class="swiper-pagination"></div>
            </div>
            <!--幻灯片结束-->
            <div class="col-6 px-0">
                <div class="row mx-0">
                    <div class="col-5 gg-mid">
                        <a class="subsitute-bg" href="#" target="_blank">
                            <img src="__IMAGES__/4208_f916067cd827f10adc6511f5096dcf35.jpg">
                        </a>
                        <a class="subsitute-bg" href="#" target="_blank">
                            <img src="__IMAGES__/4208_1cf5da2779e75d1c7c5c89d313e9a631.jpg">
                        </a>
                    </div>
                    <div class="col-7 px-0">
                        <div class="gg-data row mx-0">
                            <div class="col-4 text-center border-right">
                                <p class="text-ellipsis">今日更新</p>
                                <h4 class="text-danger mb-0">{$day_num}</h4>
                            </div>
                            <div class="col-8">
                                <p class="text-secondary text-ellipsis">资料总数：<span class="text-danger">{$article_count}</span></p>
                                <p class="text-secondary text-ellipsis">会员总数：<span class="text-danger">{$user_count}</span></p>
                            </div>
                        </div>
                        <div class="gg-announce">
                            <div id="carouselAnnounceCaptions" class="carousel slide carousel-vertical" data-ride="carousel">
                                <div class="carousel-inner">
                                    {help_list limit="5" affiche='1'}
                                    <div data-interval="2000" class="carousel-item {eq name='$key' value='0'}active{/eq}">
                                        <a class="text-secondary text-ellipsis  text-decoration-none" href="{:url('/help/' . $id,'','html')}" target="_blank"><i class="iconfont">&#xe676;</i>&nbsp;&nbsp;{$title}</a>
                                    </div>
                                    {/help_list}
                                </div>
                            </div>
                        </div>
                        <div class="gg-nav row mx0 mt-3">
                            <a class="col-6 text-secondary text-decoration-none text-ellipsis" href="{:url('/user/download')}" target="_blank">我的下载</a>
                            <a class="col-6 text-secondary text-decoration-none text-ellipsis" href="{:url('/join_platform')}" target="_blank">招聘兼职</a>
                            <a class="col-6 text-secondary text-ellipsis" href="{:url('/user/index')}" target="_blank">个人中心</a>
                            <a class="col-6 text-secondary text-ellipsis" href="{:url('/user/document')}" target="_blank">我要上传</a>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <div class="mt-3 rounded row flex-nowrap limit-shopping">
            <ul class="d-flex">

                {article_list is_recommend="1" limit="5"}
                <li>
                    <a class="text-secondary font-14" href="{:url('/zy-' . $article.id,"","html",true)}" target="_blank">
                        <div class="rounded overflow-hidden subsitute-bg">
                            <img src="/{$article.thumb}" alt="{$article.title}" width="100%">
                        </div>
                        <div>
                            <p class="text-ellipsis my-1 text-dark" title="{$article.title}">{$article.title}</p>
                        </div>
                    </a>
                </li>
                {/article_list}

            </ul>
        </div>
    </div>
</div>
<div class="width-out mt-3">

    <div class="gg-gap">
        <a href="{:url('/vip')}" target="_blank"><img width="100%" alt="升级vip" src="__IMAGES__/payall.jpg"  class="rounded"></a>
    </div>

    <!--最近更新-->
    <div class="latest-information mt-3">
        <div class="d-flex align-items-center border-bottom mx-4">
            <div class="flex-grow-1 pr-4">
                <ul class="nav custom-tab">
                    <li class="nav-item">
                        <a class="nav-link active py-3">最近更新</a>
                    </li>
                </ul>
            </div>
            <h5 class="mb-0 font-16 pl-4" style="width: 300px">热门资料排行榜</h5>
        </div>
        <div class="tab-content" id="LItabContent">
            <div class="tab-pane fade show active">
                <div class="d-flex">
                    <ul class="mx-75 px-0 pt-4 mb-0 d-flex latest-information-con-item flex-grow-1 flex-wrap align-items-start tab-inner-content">
                        {last_update limit="12"}
                        <li class="font-14">
                            <a class="text-dark" href="{:url('/zy-' . $id,"","html",true)}" target="_blank">
                                <div class="rounded border overflow-hidden">
                                    <img alt="{$title}" src="{$article | showThumbnail}">
                                </div>
                                <p class="text-ellipsis-2 mt-1 mb-0" title="{$title}">{$title}</p>
                            </a>
                        </li>
                        {/last_update}
                    </ul>
                    <div class="latest-information-hotlist pr-4 pt-4 flex-shrink-0">
                        <ul class="pl-0 mb-0 tab-inner-hot_content">
                            {last_update limit="9"}
                            <li class="font-14 mb-3">
                                <div {eq name="$key" value="0"}style="display: block;"{else}style="display:none;"{/eq}>
                                    <a class="d-flex text-dark" href="{:url('/zy-' . $id,"","html",true)}" target="_blank">
                                        <span>{$key+1}</span>
                                        <div {eq name="$key" value="0"}style="display: block;"{else}style="display:none;"{/eq} class="rounded border subsitute-bg overflow-hidden mr-3 flex-shrink-0 ">
                                            <img alt="{$title}" src="{$article | showThumbnail}">
                                        </div>
                                        <p class="my-0 flex-grow-1">{$title}</p>
                                    </a>
                                </div>
                                <a {eq name="$key" value="0"}style="display: none;"{else}style="display: block;"{/eq} class="text-ellipsis text-dark" href="{:url('/zy-' . $id,"","html",true)}" target="_blank" title="{$title}">
                                    <span>{$key+1}</span>{$title}
                                </a>
                            </li>
                            {/last_update}
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>


    {category_list is_home="1"}
    <!--{$category.name}-->
    <div class="lesson-preparation mt-3">
        <div class="d-flex align-items-center border-bottom mx-4">
            <h5 class="left-border-3 mb-0">{$category.name}</h5>
            <div class="flex-grow-1 pr-4">
                <ul class="nav custom-tab" id="LPtab" role="tablist">
                    {foreach $category.children as $index => $sub }
                    <li class="nav-item" role="presentation">
                        <a class="nav-link {eq name="$index" value="0"}active{/eq}"  py-3" data-toggle="tab" href="#TAPlp{$category.id}{$sub.id}" role="tab">{$sub.name}</a>
                    </li>
                    {/foreach}
                </ul>
            </div>
        </div>
        <div class="tab-content" id="LPtabContent">

            {foreach $category.children as $index => $sub }
            <div class="tab-pane fade {eq name="$index" value="0"} show active{/eq}" id="TAPlp{$category.id}{$sub.id}"
                 role="tabpanel" data-loading="false">
                <ul class="mx-75 px-0 pt-4 mb-0 d-flex lesson-preparation-con-item flex-grow-1 flex-wrap tab-inner-topic">
                    {article_list cid="$sub['id']" limit="16"}
                    <li class="font-14">
                        <a class="text-dark" href="{:url('/zy-' . $article.id,"","html",true)}" target="_blank">
                            <div class="rounded border subsitute-bg overflow-hidden position-center-img ">
                                <img src="{$article | showThumbnail}" alt="{$article.title}">
                            </div>
                            <p class="text-ellipsis-2 mt-1 mb-0" title="{$article.title}">{$article.title}</p>
                        </a>
                    </li>
                    {/article_list}
                </ul>
            </div>
            {/foreach}

        </div>
    </div>
    {/category_list}

    <div class="friend-link mt-3">
        <div class="py-3 mx-4 border-bottom">
            <h5 class="left-border-3 mb-0">友情链接</h5>
        </div>
        <ul class="px-2 pt-2 d-flex mx-0 px-4 mt-3 flex-wrap">
            {link limit="5"}
            <li>
                <a href="{$link.url}" target="_blank">{$link.name}</a>
            </li>
            {/link}
        </ul>
    </div>
</div>
{/block}
{block name="footer"}
<script src="__JS__/swiper.min.js"></script>
<script>
    // var mySwiper = new Swiper('.slide', {
    //     autoplay: true,//可选选项，自动滑动
    //     initialSlide :1,//默认显示第二张图片索引从0开始
    //     speed:2000,//设置过度时间
    //     /* grabCursor: true,//鼠标样式根据浏览器不同而定 */
    //     autoplay : {
    //         delay:1000,
    //         disableOnInteraction: false,
    //     },                 /*  设置每隔3000毫秒切换 */
    //     <!-- 分页器 -->
    //     pagination: {
    //         el: '.swiper-pagination',
    //         clickable :true,
    //     },
    //     <!-- 导航按钮 上一页下一页 -->
    //     navigation: {
    //         nextEl: '.swiper-button-next',
    //         prevEl: '.swiper-button-prev',
    //     }
    // });
</script>
{/block}
